import request from '@/utils/request'

// 文章列表-分页
export const getArticleListApi = params => request({
  url: '/ydd_article/list',
  method: 'GET',
  params
})

// 分类列表-全部
export const getCateListApi = params => request({
  url: '/ydd_cate/all',
  method: 'GET'

})

// 标签列表-全部
export const getTagListApi = params => request({
  url: '/ydd_tag/all',
  method: 'GET'

})

// 文章添加
export const addArticleApi = data => request({
  url: '/ydd_article/add',
  method: 'post',
  data

})

// 文章详情
export const getArticleInfoApi = id => request({
  url: '/ydd_article/rowInfo?id=' + id,
  method: 'get'

})

// 文章修改
export const editArticleApi = data => request({
  url: '/ydd_article/update',
  method: 'post',
  data

})

// 文章删除
export const delArticleApi = id => request({
  url: '/ydd_article/del?id=' + id,
  method: 'get'

})
